<?php


namespace App\Model\Logic;

use App\Model\Entity\Shops;
use Swoft\Bean\Annotation\Mapping\Bean;

/**
 * @Bean()
 * Class ShopLogic
 * @package App\Model\Logic
 */
class ShopLogic
{

    /**
     * --------------------------------------------------------------------------
     * 根据shop id获取店铺信息
     * --------------------------------------------------------------------------
     * @param $shop_id
     * @return array|mixed
     */
    public static function getShopInfoById($shop_id)
    {
        $shop = Shops::find($shop_id);
        if(!$shop) return [];
        return toArray($shop);
    }
}